package 曾世昌12_8.zuoye4;

import java.lang.reflect.Constructor;
import java.lang.reflect.Method;

public class demo {
    public static void main(String[] args) throws Exception {
        Class<?> aClass = Class.forName( "rc.mxdx3_zhoumozuoye.zuoye4.Student" );
        Constructor<?> dec = aClass.getDeclaredConstructor( String.class, int.class );
        dec.setAccessible( true );
        Object o = dec.newInstance( "11", 11 );

        Method show = aClass.getDeclaredMethod( "show" );
        show.setAccessible( true );
        Object invoke = show.invoke(o);
        System.out.println(invoke);
    }
}
